#ifndef QABSTRACTPAGE_H
#define QABSTRACTPAGE_H

#include "pc_core_global.h"

#include "../shared/qabstractplugin.h"

#include <QUndoStack>
#include <QIcon>
#include <QWidget>

#define PAGE_PLUGIN_TYPE      "Plugin.Page"

class QDeviceCore;

class PC_CORE_SHARED_EXPORT QAbstractPage : public QAbstractPlugin
{
    Q_OBJECT
public:
    QWidget*            get_widget();
    QUndoStack*         get_undo_stack();

    void                init_plugin();
    QString             get_plugin_type();

    virtual QIcon       get_page_icon()=0;
    virtual QString     get_page_name()=0;
    virtual int         get_index()=0;
    virtual bool        get_enabled()=0;
protected:
    virtual void        create_widget()=0;

protected:
    QWidget            *m_widget;
    QUndoStack         *m_undo_stack;
public:
    static QDeviceCore         *m_device_core;
};

#endif // QABSTRACTPAGE_H
